package Bill.app.client;

public class OXconverter
{

    public OXconverter()
    {
    }

    public static String convOX(long a)//convertir en Hexadecimal utile pour
    //le transfert des couleurs
    {
        String xx = "";
        long r = a % 16L;
        if(r == 10L)
            xx = "A";
        else
        if(r == 11L)
            xx = "B";
        else
        if(r == 12L)
            xx = "C";
        else
        if(r == 13L)
            xx = "D";
        else
        if(r == 14L)
            xx = "E";
        else
        if(r == 15L)
            xx = "F";
        else
            xx = (new StringBuilder()).append(r).toString();
        for(a /= 16L; a != 0L;)
        {
            r = a % 16L;
            a /= 16L;
            if(r == 10L)
                xx = (new StringBuilder(String.valueOf('A'))).append(xx).toString();
            else
            if(r == 11L)
                xx = (new StringBuilder(String.valueOf('B'))).append(xx).toString();
            else
            if(r == 12L)
                xx = (new StringBuilder(String.valueOf('C'))).append(xx).toString();
            else
            if(r == 13L)
                xx = (new StringBuilder(String.valueOf('D'))).append(xx).toString();
            else
            if(r == 14L)
                xx = (new StringBuilder(String.valueOf('E'))).append(xx).toString();
            else
            if(r == 15L)
                xx = (new StringBuilder(String.valueOf('F'))).append(xx).toString();
            else
                xx = (new StringBuilder(String.valueOf(r))).append(xx).toString();
        }

        return xx;
    }
}
